package cn.szzsi.common.model;

import cn.szzsi.common.model.base.BaseUserFeedback;

import java.util.Date;

/**
 * 用户反馈
 * Created by yuanzheng on 2016/12/8.
 */
//@TableBind(tableName = "b_user_feedback",pkName = "id")
public class UserFeedback extends BaseUserFeedback<UserFeedback> {
    public static final UserFeedback dao=new UserFeedback().dao();

    public void saveInfo(String content, String name, String phone, String uid, Member member){
        UserFeedback userFeedBack=new UserFeedback();
        userFeedBack.set("content",content);
        userFeedBack.set("name",name);
        userFeedBack.set("phone",phone);
        userFeedBack.set("uid",uid);
        userFeedBack.set("createDate",new Date());
        if(member!=null){
            userFeedBack.set("mid",member.getStr("id"));
        }else{
            userFeedBack.set("mid","");
        }

        userFeedBack.save();

    }
}
